Haskell DSLs for Interactive Web Services
نویسندگان
چکیده
Robust cross-platform GUI-based applications are challenging to write in Haskell, not because providing hooks into existing GUI frameworks is hard, but because these hooks are both platform dependent and prone to rapid bit-rot. Browser-based user interfaces implemented using Javascript and HTML5 offer some relief from this situation, providing a standardized cross-platform API. However, Javascript is a client-side scripting language, and a traditional shallow, foreign-function-call style Haskell interface to the client does not scale well because calling a Javascript command involves sending the command, and optionally waiting for a response, over a network. Instead, we build a deep embedding of Javascript commands inside a Javascript monad. Along with supporting webbased infrastructure, we deliver entire program fragments to our web-based applications. Using our monad, the Haskell programmer can choose the granularity of interaction, with the option of having reactive interfaces that are completely handled by the client.
منابع مشابه
An Editor in Haskell for Haskell
Yi is a text editor written in Haskell and extensible in Haskell. We take advantage of Haskell’s expressive power to define embedded DSLs that form the foundation of the editor. In turn, these DSLs provide a flexible mechanism to create extended versions of the editor. Yi also provides some support for editing Haskell code.
متن کاملTurning an interactive tool implemented in Haskell into a web application – An experience report
At the Open University, The Netherlands, we are developing interactive exercise assistants that give good feedback to students trying to solve mathematical or logical exercises. To simplify installing, maintaining, and adapting the tools, and to improve reporting facilities, we have turned our tools into web applications. Since our tools are implemented in Haskell, this implies that we have to ...
متن کاملImplementing Explicit and Finding Implicit Sharing in Embedded DSLs
Aliasing, or sharing, is prominent in many domains, denoting that two differently-named objects are in fact identical: a change in one object (memory cell, circuit terminal, disk block) is instantly reflected in the other. Languages for modelling such domains should let the programmer explicitly define the sharing among objects or expressions. A DSL compiler may find other identical expressions...
متن کاملA web based environment to support teaching of functional programming
We report on our approach to employ the WWW in order to support lecture room teaching of functional programming, especially Haskell and Scheme, with interactive web based tools for the students: immediate feedback on interactively submitted solutions of programming tasks, structured submissions of induction proofs and multiple choice questionnaires.
متن کاملNettle: Functional Reactive Programming for OpenFlow Networks
We describe a language-centric approach to solving the complex, low-level, and error-prone nature of network control. Specifically, we have designed a domain-specific language called Nettle, embedded in Haskell, that allows programming OpenFlow networks in an elegant, declarative style. Nettle is designed in layers to accommodate a family of DSLs targeted for specific network applications. The ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012